// <copyright file="YUIScriptDependencyResolver.cs" company="YUIAsp.Net">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>raul popescu</author>
// <email>dev@yuiasp.net</email>
// <date>2009-01-30</date>
// <summary>YUIAsp.Net File</summary>

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Web.UI;
using YUIAspNet.Common;

#region Resource declaration
[assembly: WebResource(YUIScriptDependencyResolver.YAHOO, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.YAHOO_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.YAHOO_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.DOM, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DOM_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DOM_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.CONTAINER, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CONTAINER_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CONTAINER_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.EVENT, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.EVENT_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.EVENT_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.ELEMENT, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.ELEMENT_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.ELEMENT_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.LOGGER, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.LOGGER_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.LOGGER_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.YAHOO_DOM_EVENT, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.ANIMATION, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.ANIMATION_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.ANIMATION_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.DRAGDROP, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DRAGDROP_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DRAGDROP_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.SLIDER, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.SLIDER_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.SLIDER_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.COLORPICKER, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.COLORPICKER_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.COLORPICKER_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.BUTTON, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.BUTTON_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.BUTTON_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.TREEVIEW, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.TREEVIEW_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.TREEVIEW_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.MENU, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.MENU_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.MENU_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.TABVIEW, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.TABVIEW_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.TABVIEW_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.CALENDAR, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CALENDAR_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CALENDAR_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.DATASOURCE, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DATASOURCE_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DATASOURCE_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.AUTOCOMPLETE, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.AUTOCOMPLETE_MIN, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.AUTOCOMPLETE_DEBUG, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.CONNECTION, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CONNECTION_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CONNECTION_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.CHARTS, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CHARTS_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.CHARTS_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.EDITOR, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.EDITOR_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.EDITOR_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.JSON, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.JSON_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.JSON_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.DATATABLE, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DATATABLE_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.DATATABLE_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.PAGINATOR_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.LAYOUT, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.LAYOUT_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.LAYOUT_MIN, "text/javascript")]

[assembly: WebResource(YUIScriptDependencyResolver.RESIZE, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.RESIZE_DEBUG, "text/javascript")]
[assembly: WebResource(YUIScriptDependencyResolver.RESIZE_MIN, "text/javascript")] 
#endregion

namespace YUIAspNet.Common
{
    [ToolboxItem(false)]
    internal static class YUIScriptDependencyResolver
    {
        #region Javascript elements declaration
        internal const string YAHOO = "YUIAspNet.References.yahoo.yahoo.js";
        internal const string YAHOO_DEBUG = "YUIAspNet.References.yahoo.yahoo-debug.js";
        internal const string YAHOO_MIN = "YUIAspNet.References.yahoo.yahoo-min.js";

        internal const string JSON = "YUIAspNet.References.json.json.js";
        internal const string JSON_DEBUG = "YUIAspNet.References.json.json-debug.js";
        internal const string JSON_MIN = "YUIAspNet.References.json.json-min.js";

        internal const string DOM = "YUIAspNet.References.dom.dom.js";
        internal const string DOM_DEBUG = "YUIAspNet.References.dom.dom-debug.js";
        internal const string DOM_MIN = "YUIAspNet.References.dom.dom-min.js";

        internal const string ANIMATION = "YUIAspNet.References.animation.animation.js";
        internal const string ANIMATION_DEBUG = "YUIAspNet.References.animation.animation-debug.js";
        internal const string ANIMATION_MIN = "YUIAspNet.References.animation.animation-min.js";

        internal const string CONNECTION = "YUIAspNet.References.connection.connection.js";
        internal const string CONNECTION_DEBUG = "YUIAspNet.References.connection.connection-debug.js";
        internal const string CONNECTION_MIN = "YUIAspNet.References.connection.connection-min.js";

        internal const string EVENT = "YUIAspNet.References.event.event.js";
        internal const string EVENT_DEBUG = "YUIAspNet.References.event.event-debug.js";
        internal const string EVENT_MIN = "YUIAspNet.References.event.event-min.js";

        internal const string ELEMENT = "YUIAspNet.References.element.element-beta.js";
        internal const string ELEMENT_DEBUG = "YUIAspNet.References.element.element-beta-debug.js";
        internal const string ELEMENT_MIN = "YUIAspNet.References.element.element-beta-min.js";

        internal const string LOGGER = "YUIAspNet.References.logger.logger.js";
        internal const string LOGGER_DEBUG = "YUIAspNet.References.logger.logger-debug.js";
        internal const string LOGGER_MIN = "YUIAspNet.References.logger.logger-min.js";

        internal const string YAHOO_DOM_EVENT = "YUIAspNet.References.yahoodomevent.yahoo-dom-event.js";

        internal const string DRAGDROP = "YUIAspNet.References.dragdrop.dragdrop.js";
        internal const string DRAGDROP_DEBUG = "YUIAspNet.References.dragdrop.dragdrop-debug.js";
        internal const string DRAGDROP_MIN = "YUIAspNet.References.dragdrop.dragdrop-min.js";

        internal const string CONTAINER = "YUIAspNet.References.container.container.js";
        internal const string CONTAINER_DEBUG = "YUIAspNet.References.container.container-debug.js";
        internal const string CONTAINER_MIN = "YUIAspNet.References.container.container-min.js";

        internal const string MENU = "YUIAspNet.References.menu.menu.js";
        internal const string MENU_DEBUG = "YUIAspNet.References.menu.menu-debug.js";
        internal const string MENU_MIN = "YUIAspNet.References.menu.menu-min.js";

        internal const string SLIDER = "YUIAspNet.References.slider.slider.js";
        internal const string SLIDER_DEBUG = "YUIAspNet.References.slider.slider-debug.js";
        internal const string SLIDER_MIN = "YUIAspNet.References.slider.slider-min.js";

        internal const string COLORPICKER = "YUIAspNet.References.colorpicker.colorpicker.js";
        internal const string COLORPICKER_DEBUG = "YUIAspNet.References.colorpicker.colorpicker-debug.js";
        internal const string COLORPICKER_MIN = "YUIAspNet.References.colorpicker.colorpicker-min.js";

        internal const string BUTTON = "YUIAspNet.References.button.button.js";
        internal const string BUTTON_DEBUG = "YUIAspNet.References.button.button-debug.js";
        internal const string BUTTON_MIN = "YUIAspNet.References.button.button-min.js";

        internal const string TREEVIEW = "YUIAspNet.References.treeview.treeview.js";
        internal const string TREEVIEW_DEBUG = "YUIAspNet.References.treeview.treeview-debug.js";
        internal const string TREEVIEW_MIN = "YUIAspNet.References.treeview.treeview-min.js";

        internal const string CALENDAR = "YUIAspNet.References.calendar.calendar.js";
        internal const string CALENDAR_DEBUG = "YUIAspNet.References.calendar.calendar-debug.js";
        internal const string CALENDAR_MIN = "YUIAspNet.References.calendar.calendar-min.js";
        
        internal const string TABVIEW = "YUIAspNet.References.tabview.tabview.js";
        internal const string TABVIEW_DEBUG = "YUIAspNet.References.tabview.tabview-debug.js";
        internal const string TABVIEW_MIN = "YUIAspNet.References.tabview.tabview-min.js";

        internal const string DATASOURCE = "YUIAspNet.References.datasource.datasource.js";
        internal const string DATASOURCE_DEBUG = "YUIAspNet.References.datasource.datasource-debug.js";
        internal const string DATASOURCE_MIN = "YUIAspNet.References.datasource.datasource-min.js";

        internal const string AUTOCOMPLETE = "YUIAspNet.References.autocomplete.autocomplete.js";
        internal const string AUTOCOMPLETE_DEBUG = "YUIAspNet.References.autocomplete.autocomplete-debug.js";
        internal const string AUTOCOMPLETE_MIN = "YUIAspNet.References.autocomplete.autocomplete-min.js";

        internal const string CAROUSEL = "YUIAspNet.References.carousel.carousel-beta.js";
        internal const string CAROUSEL_DEBUG = "YUIAspNet.References.carousel.carousel-beta-debug.js";
        internal const string CAROUSEL_MIN = "YUIAspNet.References.carousel.carousel-beta-min.js";

        internal const string CHARTS = "YUIAspNet.References.charts.charts-experimental.js";
        internal const string CHARTS_DEBUG = "YUIAspNet.References.charts.charts-experimental-debug.js";
        internal const string CHARTS_MIN = "YUIAspNet.References.charts.charts-experimental-min.js";

        internal const string EDITOR = "YUIAspNet.References.editor.simpleeditor.js";
        internal const string EDITOR_DEBUG = "YUIAspNet.References.editor.simpleeditor-debug.js";
        internal const string EDITOR_MIN = "YUIAspNet.References.editor.simpleeditor-min.js";

        internal const string DATATABLE = "YUIAspNet.References.datatable.datatable.js";
        internal const string DATATABLE_DEBUG = "YUIAspNet.References.datatable.datatable-debug.js";
        internal const string DATATABLE_MIN = "YUIAspNet.References.datatable.datatable-min.js";

        internal const string PAGINATOR = "YUIAspNet.References.paginator.paginator.js";
        internal const string PAGINATOR_DEBUG = "YUIAspNet.References.paginator.paginator-debug.js";
        internal const string PAGINATOR_MIN = "YUIAspNet.References.paginator.paginator-min.js";

        internal const string LAYOUT = "YUIAspNet.References.layout.layout.js";
        internal const string LAYOUT_DEBUG = "YUIAspNet.References.layout.layout-debug.js";
        internal const string LAYOUT_MIN = "YUIAspNet.References.layout.layout-min.js";

        internal const string RESIZE = "YUIAspNet.References.resize.resize.js";
        internal const string RESIZE_DEBUG = "YUIAspNet.References.resize.resize-debug.js";
        internal const string RESIZE_MIN = "YUIAspNet.References.resize.resize-min.js";
        #endregion

        private static IDictionary<string, List<YUIScriptName>> _dependencyList;

        internal static IEnumerable<ScriptReference> GetScriptDescriptors(string controlName, ScriptMode scriptMode, bool enableAnimation)
        {
            if (GetDependencyList(controlName) == null)
                throw new ApplicationException(string.Format(CultureInfo.InvariantCulture, "Control {0} is not added to list of references!", controlName));

            foreach (var libItem in GetDependencyList(controlName))
            {
                YUILibraryItem dependentItem = new YUILibraryItem(libItem);

                yield return dependentItem.GetScriptReference(scriptMode);
            }
        }

        private static IEnumerable<YUIScriptName> GetDependencyList(string controlName)
        {
            if (_dependencyList == null)
            {
                _dependencyList = new Dictionary<string, List<YUIScriptName>>();


                #region ColorPicker
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(ColorPicker).Name,
                                                                           new List<YUIScriptName>
                                                                       {
                                                                           YUIScriptName.Yahoo,
                                                                           YUIScriptName.Dom,
                                                                           YUIScriptName.Animation,
                                                                           YUIScriptName.Event,
                                                                           YUIScriptName.Element,
                                                                           YUIScriptName.Logger,
                                                                           YUIScriptName.YahooDomEvent,
                                                                           YUIScriptName.DragDrop,
                                                                           YUIScriptName.Slider,
                                                                           YUIScriptName.ColorPicker
                                                                       }
                                )); 
                #endregion

                #region Slider
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(Slider).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Animation,
                                                                          YUIScriptName.Logger,
                                                                          YUIScriptName.DragDrop,
                                                                          YUIScriptName.Slider
                                                                      })); 
                #endregion

                #region Button
                _dependencyList.Add(
                           new KeyValuePair<string, List<YUIScriptName>>(typeof(Button).Name,
                                                                         new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Container,
                                                                          YUIScriptName.Logger,
                                                                          YUIScriptName.Button
                                                                      })); 
                #endregion

                #region RadioButtonList
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(RadioButtonList).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Container,
                                                                          YUIScriptName.Button,
                                                                          YUIScriptName.Logger
                                                                      })); 
                #endregion

                #region TabView
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(TabView).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Logger,
                                                                          YUIScriptName.TabView
                                                                      })); 
                #endregion
           
                #region Menu
                _dependencyList.Add(
                    new KeyValuePair<string, List<YUIScriptName>>(typeof (Menu).Name,
                                                                  new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Logger,
                                                                          YUIScriptName.Animation,
                                                                          YUIScriptName.Container,
                                                                          YUIScriptName.Menu
                                                                      })); 
	            #endregion

                #region Calendar
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(Calendar).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.Yahoo,
                                                                          YUIScriptName.Event,
                                                                          YUIScriptName.Dom,
                                                                          YUIScriptName.Calendar
                                                                      })); 
                #endregion

                #region TreeView
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(TreeView).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.Yahoo,
                                                                          YUIScriptName.Dom,
                                                                          YUIScriptName.Event,
                                                                          YUIScriptName.Logger,
                                                                          YUIScriptName.TreeView
                                                                      }));

                #endregion

                #region AutoComplete
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(AutoComplete).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Connection,
                                                                          YUIScriptName.Connection,
                                                                          YUIScriptName.DataSource,
                                                                          YUIScriptName.Animation,
                                                                          YUIScriptName.AutoComplete
                                                                      })); 
                #endregion

                #region Chart
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>("Chart",
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Json,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.DataSource,
                                                                          YUIScriptName.Connection,
                                                                          YUIScriptName.Charts
                                                                      })); 
                #endregion

                #region Logger
                _dependencyList.Add(
                          new KeyValuePair<string, List<YUIScriptName>>(typeof(Logger).Name,
                                                                        new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.DragDrop,
                                                                          YUIScriptName.Logger
                                                                          })); 
                #endregion

                #region SimpleEditor
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(SimpleEditor).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Container,
                                                                          YUIScriptName.Menu,
                                                                          YUIScriptName.Button,
                                                                          YUIScriptName.RichTextEditor
                                                                          })); 
                #endregion

                #region DataTable
                _dependencyList.Add(
                           new KeyValuePair<string, List<YUIScriptName>>(typeof(DataTable).Name,
                                                                         new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Connection,
                                                                          YUIScriptName.DragDrop,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Paginator,
                                                                          YUIScriptName.DataSource,
                                                                          YUIScriptName.DataTable
                                                                      })); 
                #endregion

                #region Paginator
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(Paginator).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Paginator
                                                                      })); 
                #endregion

                #region LayoutManager
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(LayoutManager).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.Yahoo,
                                                                          YUIScriptName.DragDrop,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.Resize,
                                                                          YUIScriptName.Layout
                                                                      })); 
                #endregion

                #region Tooltip
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>(typeof(Tooltip).Name,
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Animation,
                                                                          YUIScriptName.Container
                                                                      })); 
                #endregion

                #region Dialog
                _dependencyList.Add(
                            new KeyValuePair<string, List<YUIScriptName>>("Dialog",
                                                                          new List<YUIScriptName>
                                                                      {
                                                                          YUIScriptName.YahooDomEvent,
                                                                          YUIScriptName.Animation,
                                                                          YUIScriptName.Element,
                                                                          YUIScriptName.DragDrop,
                                                                          YUIScriptName.Button,
                                                                          YUIScriptName.Container
                                                                      })); 
                #endregion
            }

            if(_dependencyList.ContainsKey(controlName))
                return _dependencyList[controlName];

            return null;
        }
    }
}